package com.bamboo.eduservice.mapper;

import com.bamboo.eduservice.entity.EduCourse;
import com.bamboo.eduservice.entity.frontvo.CourseWebVo;
import com.bamboo.eduservice.entity.vo.CoursePublishVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 课程 Mapper 接口
 * </p>
 *
 * @author jack.wu
 * @since 2020-07-05
 */
@Repository
public interface EduCourseMapper extends BaseMapper<EduCourse> {

    /**
     * 根据id查询课程
     *
     * @param courseId 课程id
     * @return 课程信息
     */
    EduCourse getById(String courseId);


    /**
     * 根据课程id得到最终发布信息
     *
     * @param courseId 课程id
     * @return 最终发布信息
     */
    CoursePublishVo getPublishInfoByCourseId(String courseId);

    /**
     * 查询课程基础信息
     *
     * @param id 课程id
     * @return 课程基础信息
     */
    CourseWebVo selectCourseBaseInfo(String id);
}
